package org.springcloud.wisdom.amusement.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("wisdom.wall")
public class Wall implements Serializable {
    //主键id
    private Integer id;
    //单条信息的总id号
    private Integer fatherid;

    @Override
    public String toString() {
        return "Wall{" +
                "id=" + id +
                ", fatherid=" + fatherid +
                ", name='" + name + '\'' +
                ", toname='" + toname + '\'' +
                ", time=" + time +
                ", msg='" + msg + '\'' +
                ", report=" + report +
                ", ispass=" + ispass +
                '}'+"\n";
    }

    //发送人
    private String name;
    //接收人
    private String toname;
    //发送时间
    @DateTimeFormat(pattern = "yyyy年MM月dd日 HH:mm:ss")
    @JsonFormat(pattern = "yyyy年MM月dd日 HH:mm:ss" , timezone = "Asia/Shanghai")
    private Date time;
    //发送信息
    private String msg;
    //记录被举报次数
    private Integer report;
    //是否审核过
    private Integer ispass;
    //被举报过多删除
    private Integer overdelete;
}
